package Day08_03;

import Day07_23.MyStack;
import Day07_23.MyStackException;

public class Test_MyException {
    public static void main(String[] args) {
        MyStack stack = new MyStack();

        try {
            stack.Push(0);
            stack.Push(1);
            stack.Push(2);
            stack.Push(3);
            stack.Push(4);
            stack.Push(5);
            stack.Push(6);
            stack.Push(7);
            stack.Push(8);
            stack.Push(9);
            //
            stack.  Push(10);

        } catch (MyStackException e) {
            //throw new RuntimeException(e);
           // System.out.println(e.getMessage());
            e.printStackTrace();
        }
    }
}
class MyException extends Exception{
    public MyException() {

    }

    public MyException(String s){
        super(s);
    }
}